<table cellpadding="0" cellspacing="0">
  <tbody>
<tr id="<%= element_row_id(@options) %>">
  <td id="<%= element_cell_id(@options) %>" class="crud">
	 	<div class="<%= @one_row_options[:crud_action] %>">
<%#= debug @one_row.survey.survey_type %>
		<% options = {:action => @one_row_options[:next_action], 
									:rescue_action => @one_row_options[:rescue_action], 
									:model => @one_row_options[:crud_model],
									:one_only => @one_row_options[:one_only],
									:parent_id => @options[:parent_id],
									:parent_id_column_name => @options[:parent_id_column_name],
									:parent_model => @options[:parent_model],
									:id => @one_row_options[:id]}
			#TODO 2006-08-18 Level=1 - make multipart optional via a method
		%>
    <%= start_form_tag options, {:name => edit_model_name(@options[:scaffold_model]), :multipart => true }%>
      
      <%= hidden_field_tag "scaffold_id", @options[:scaffold_id] %>
         
      <h4><%= Inflector.titleize(@one_row_options[:crud_action]) + " " + @options[:scaffold_model].label.singularize %></h4>

			<%= render :partial => 'shared/messages' %>

			<% unless @one_row.nil? %>
			<%= error_messages_for :one_row, :row_name => @one_row_options[:crud_model] %>
			<% end %>
      <%= render :partial => dry_template_location %>
      <%= hidden_field_tag "page", @options[:page] %>
			<%= hidden_field_tag sort_limit_field_name(@options[:scaffold_model]), sort_limit(@options[:scaffold_model]) %>

      <p class="form-footer">
      	<%= submit_tag Inflector.titleize(@one_row_options[:next_action]), :class => "submit" %>
				<%= submit_tag "Cancel" %>
			</p>
	    <%= end_form_tag %>
		</div>
  </td>
</tr>
  </tbody>
</table>
